﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ZhimeiSoft.Framework.Client.Utils;
using ZhimeiSoft.Framework.Client.Base;

namespace ZhimeiSoft.CharmManager.Client.Forms
{
    public partial class frmLogin : LoginFormBase
    {
        public frmLogin()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void btnLogin_Click(object sender, EventArgs e)
        {
            string userName = this.txtUserName.Text.Trim();
            string password = this.txtPassword.Text.Trim();
            if (string.IsNullOrEmpty(userName))
            {
                MsgBox.MsgInfo(@"请输入用户名称!");
                this.txtUserName.Focus();
                return;
            }
            if (string.IsNullOrEmpty(password))
            {
                MsgBox.MsgInfo(@"请输入密码!");
                this.txtPassword.Focus();
                return;
            }

            Submit(userName, password);
        }
    }
}
